import { createRouter, createWebHistory } from "vue-router"
import Home from "../views/Home/index.vue"

export const routes = [
    {
        path: "/home",
        name: "home",
        components: {
            default: Home,
        },
        meta: {
            title: "商城"
        }
    },

    {
        path: "/class",
        name: "class",
        components: {
            default: () => import("../views/Class/index.vue"),
        },
        meta: {
            title: "分类"
        }
    },
    {
        path: "/square",
        name: "square",
        components: {
            default: () => import("../views/Square/index.vue"),
        },
        meta: {
            title: "广场发布"
        }
    },
    {
        path: "/news",
        name: "news",
        components: {
            default: () => import("../views/News/index.vue"),
        },
        meta: {
            title: "消息"
        }
    },
    {
        path: "/me",
        name: "me",
        components: {
            default: () => import("../views/Me/index.vue"),
        },
        meta: {
            title: "我的"
        }

    },
    {
        path: "/login",
        name: "login",
        components: {
            default: () => import("../views/Login/index.vue"),
        },
        meta: {
            title: "登录",
            isHidden: true
        }
    },
    {
        path: "/logon",
        name: "logon",
        components: {
            default: () => import("../views/Logon/index.vue"),
        },
        meta: {
            title: "注册",
            isHidden: true
        }
    },
    {
        path: "/logon1",
        name: "logon1",
        components: {
            default: () => import("../views/Logon/index01.vue"),
        },
        meta: {
            title: "设置密码",
            isHidden: true
        }
    },
    {
        path: "/duanxin",
        name: "duanxin",
        components: {
            default: () => import("../views/Login/duanxin.vue"),
        },
        meta: {
            title: "短信登录",
            isHidden: true
        }
    },
    {
        path: "/topic",
        name: "topic",
        components: {
            default: () => import("../views/Topic/index.vue"),
        },
        meta: {
            title: "详情",
            isHidden: true
        }
    }
]




const router = createRouter({
    history: createWebHistory(),
    routes,
})
export default router